﻿using System;
using System.Collections.Generic;
using System.Web.Mvc;
using ControleRepresentante.Logic;
using ControleRepresentante.Logic.Models;
using WebSite.ViewModels.Fields;
using WebSite.ViewModels.IndexViewModels;

namespace WebSite.ViewModels.ViewModelExtensions.IndexViewModelExtensions
{
    public static class FabricaJolitexIndexColumns
    {
        public static Guid IsJolitex = new Guid("507f1dc2-e2ab-481a-92e0-dfe08ba82c3c");
    }

    public class FabricaJolitexIndexViewModel : IIndexViewModelExtension
    {
        public IEnumerable<IField> GetSearchFields()
        {
            return new IField[0];
        }

        public bool CanEditSpecific(ModelBase modelBase)
        {
            return true;
        }

        public bool CanDeleteSpecific(ModelBase modelBase)
        {
            return true;
        }

        public void RegisterColumns(IndexColumnDefinitionsCollection indexColumnDefinitionsCollection, IIndexColumnsProvider indexColumnsProvider)
        {
            indexColumnDefinitionsCollection.Register(indexColumnsProvider[FabricaJolitexIndexColumns.IsJolitex], x => ((Fabrica)x).FabricaJolitex.IsJolitex);
        }

        public IEnumerable<TabItem> GetTabs(HtmlHelper htmlHelper)
        {
            return new TabItem[0];
        }
    }
}